import utils


class Trend:

    def __init__(self, pen):
        self.pen = pen
        self.pen.hideturtle()
        utils.Utils.penMove(self.pen, utils.width//4, -50)

    def __enter__(self):
        return self

    def __exit__(self, exp_type, exp_value, exp_traceback):
        del self

    def drawTrend(self, n: int):
        for i in range(n):
            self.pen.pencolor(utils.Utils.getColor())
            self.pen.fd(i)
            self.pen.left(70)
